#ifndef BIG_NUMBERS_H
#define BIG_NUMBERS_H

#include "gmp.h"

#include <QtCore/QString>

namespace bignumbers
{

class BigInt
{
public:
    BigInt(const QString& value = QString(), int base = 10);
    BigInt(const BigInt& other);
    ~BigInt();

    QString toString(int base = 10) const;

    BigInt& operator=(const BigInt& other);
    const BigInt operator+(const BigInt& other) const;
    const BigInt operator-(const BigInt& other) const;
    const BigInt operator*(const BigInt& other) const;
    const BigInt operator/(const BigInt& other) const;

private:
    friend class BigFloat;
    mpz_t m_number;
};

class BigFloat
{
public:
    BigFloat(const QString& value = "0");
    BigFloat(const BigFloat& other);
    BigFloat(const BigInt& other);
    ~BigFloat();

    QString toString(int decimals = 10) const;

    BigFloat& operator=(const BigFloat& other);
    const BigFloat operator+(const BigFloat& other) const;
    const BigFloat operator-(const BigFloat& other) const;
    const BigFloat operator*(const BigFloat& other) const;
    const BigFloat operator/(const BigFloat& other) const;

private:
    mpf_t m_number;
};

} // namespace bignumbers

#endif
